package com.xhs.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.core.trans.anno.Trans;
import org.dromara.core.trans.constant.TransType;
import org.dromara.core.trans.vo.TransPojo;

import java.io.Serializable;

/**
 * 企业信息 实体类。
 *
 * @author xhs
 * @since 2023-08-13
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "cap_company_info")
public class CapCompanyInfoEntity implements Serializable, TransPojo {

    /**
     * 主键
     */
    @Id(keyType = KeyType.Auto)
    private Integer id;

    /**
     * 企业F代码
     */
    private String companyId;

    /**
     * 企业名称
     */
    private String companyName;

    /**
     * 客户经理ID
     */
    @Trans(type = TransType.SIMPLE, target = SysUserEntity.class, fields = "userName",ref="customerManagerName")
    private String customerManagerId;

    /**
     * 客户经理
     */
    @Column(ignore = true)
    private String customerManagerName;

    /**
     * 认证状态
     * 1:未认证,2:认证中,3:认证失败,4:已认证
     */
    @Trans(type = TransType.DICTIONARY, key = "status", ref = "certificationStatusName")
    private Integer certificationStatus;

    /**
     * 认证状态(非数据库字段)
     * 1:未认证,2:认证中,3:认证失败,4:已认证
     */
    @Column(ignore = true)
    private String certificationStatusName;

    /**
     * 是否限制交易
     */
    private String tradeRestrictions;

    /**
     * 是否白名单内
     */
    private String theWhitelist;

    /**
     * 是否六个月内无交易记录
     */
    private String transactionRecords;

}
